import axios from "~/http/request"
const SystemUserPrefix = "/user"

// 删除存储源
export const apiDeleteSystemUser = (id) => {
    return axios({
        url: `${SystemUserPrefix}/${id}`,
        method: "delete",
    })
}

// 删除存储源
export const apiInfoSystemUser = (id) => {
    return axios({
        url: `${SystemUserPrefix}/${id}`,
        method: "get",
    })
}

export const apiListSystemUser = (data) => {
    return axios({
        url: `${SystemUserPrefix}/list`,
        method: "post",
        data
    })
} 

export const apiAddSystemUser = (data) => {
    return axios({
        url: `${SystemUserPrefix}`,
        method: "post",
        data
    })
}

export const apiEditSystemUser = (data) => {
    return axios({
        url: `${SystemUserPrefix}`,
        method: "put",
        data
    })
}

export const apiEditPasswordSystemUser = (data) => {
    return axios({
        url: `${SystemUserPrefix}/password`,
        method: "put",
        data
    })
}

export const apiAddUserShortLink = (data) => {
    return axios({
        url: `/user/shortlink/add`,
        method: "post",
        data
    })
}

export const apiDelUserShortLink = (data) => {
    return axios({
        url: `/user/shortlink/del`,
        method: "post",
        data
    })
}

export const apiListUserShortLink = (data) => {
    return axios({
        url: `/user/shortlink/list`,
        method: "post",
        data
    })
}